<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>ResourceVersion | ts</title>
	<meta name="description" content="Documentation for ts">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
	<div class="tsd-page-toolbar">
		<div class="container">
			<div class="table-wrap">
				<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
					<div class="field">
						<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
						<input id="tsd-search-field" type="text" />
					</div>
					<ul class="results">
						<li class="state loading">Preparing search index...</li>
						<li class="state failure">The search index is not available</li>
					</ul>
					<a href="../index.html" class="title">ts</a>
				</div>
				<div class="table-cell" id="tsd-widgets">
					<div id="tsd-filter">
						<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
						<div class="tsd-filter-group">
							<div class="tsd-select" id="tsd-filter-visibility">
								<span class="tsd-select-label">All</span>
								<ul class="tsd-select-list">
									<li data-value="public">Public</li>
									<li data-value="protected">Public/Protected</li>
									<li data-value="private" class="selected">All</li>
								</ul>
							</div>
							<input type="checkbox" id="tsd-filter-inherited" checked />
							<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
							<input type="checkbox" id="tsd-filter-externals" checked />
							<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
							<input type="checkbox" id="tsd-filter-only-exported" />
							<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
						</div>
					</div>
					<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
				</div>
			</div>
		</div>
	</div>
	<div class="tsd-page-title">
		<div class="container">
			<ul class="tsd-breadcrumb">
				<li>
					<a href="../globals.html">Globals</a>
				</li>
				<li>
					<a href="../modules/_laya_net_resourceversion_.html">&quot;laya/net/ResourceVersion&quot;</a>
				</li>
				<li>
					<a href="_laya_net_resourceversion_.resourceversion.html">ResourceVersion</a>
				</li>
			</ul>
			<h1>Class ResourceVersion</h1>
		</div>
	</div>
</header>
<div class="container container-main">
	<div class="row">
		<div class="col-8 col-content">
			<section class="tsd-panel tsd-comment">
				<div class="tsd-comment tsd-typography">
					<div class="lead">
						<p>资源版本的生成由layacmd或IDE完成，使用 <code>ResourceVersion</code> 简化使用过程。</p>
						<p>调用 <code>enable</code> 启用资源版本管理。</p>
					</div>
				</div>
			</section>
			<section class="tsd-panel tsd-hierarchy">
				<h3>Hierarchy</h3>
				<ul class="tsd-hierarchy">
					<li>
						<span class="target">ResourceVersion</span>
					</li>
				</ul>
			</section>
			<section class="tsd-panel-group tsd-index-group">
				<h2>Index</h2>
				<section class="tsd-panel tsd-index-panel">
					<div class="tsd-index-content">
						<section class="tsd-index-section ">
							<h3>Properties</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="_laya_net_resourceversion_.resourceversion.html#filename_version" class="tsd-kind-icon">FILENAME_<wbr>VERSION</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="_laya_net_resourceversion_.resourceversion.html#folder_version" class="tsd-kind-icon">FOLDER_<wbr>VERSION</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="_laya_net_resourceversion_.resourceversion.html#manifest" class="tsd-kind-icon">manifest</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="_laya_net_resourceversion_.resourceversion.html#type" class="tsd-kind-icon">type</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Methods</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="_laya_net_resourceversion_.resourceversion.html#addversionprefix" class="tsd-kind-icon">add<wbr>Version<wbr>Prefix</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="_laya_net_resourceversion_.resourceversion.html#enable" class="tsd-kind-icon">enable</a></li>
							</ul>
						</section>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Properties</h2>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
					<a name="filename_version" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagStatic">Static</span> FILENAME_<wbr>VERSION</h3>
					<div class="tsd-signature tsd-kind-icon">FILENAME_<wbr>VERSION<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 2</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/layabox/LayaAir/blob/428b7e7e/src/layaAir/laya/net/ResourceVersion.ts#L14">laya/net/ResourceVersion.ts:14</a></li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>基于文件名映射管理方式（新版本IDE默认类型）</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
					<a name="folder_version" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagStatic">Static</span> FOLDER_<wbr>VERSION</h3>
					<div class="tsd-signature tsd-kind-icon">FOLDER_<wbr>VERSION<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 1</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/layabox/LayaAir/blob/428b7e7e/src/layaAir/laya/net/ResourceVersion.ts#L12">laya/net/ResourceVersion.ts:12</a></li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>基于文件夹的资源管理方式（老版本IDE默认类型）</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
					<a name="manifest" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagStatic">Static</span> manifest</h3>
					<div class="tsd-signature tsd-kind-icon">manifest<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/layabox/LayaAir/blob/428b7e7e/src/layaAir/laya/net/ResourceVersion.ts#L16">laya/net/ResourceVersion.ts:16</a></li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>版本清单</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
					<a name="type" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagStatic">Static</span> type</h3>
					<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = ResourceVersion.FOLDER_VERSION</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/layabox/LayaAir/blob/428b7e7e/src/layaAir/laya/net/ResourceVersion.ts#L18">laya/net/ResourceVersion.ts:18</a></li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>当前使用的版本管理类型</p>
						</div>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Methods</h2>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static">
					<a name="addversionprefix" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagStatic">Static</span> add<wbr>Version<wbr>Prefix</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static">
						<li class="tsd-signature tsd-kind-icon">add<wbr>Version<wbr>Prefix<span class="tsd-signature-symbol">(</span>originURL<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/layabox/LayaAir/blob/428b7e7e/src/layaAir/laya/net/ResourceVersion.ts#L46">laya/net/ResourceVersion.ts:46</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>为加载路径添加版本前缀。</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>originURL: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>源路径。</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
							<p>格式化后的新路径。</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static">
					<a name="enable" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagStatic">Static</span> enable</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static">
						<li class="tsd-signature tsd-kind-icon">enable<span class="tsd-signature-symbol">(</span>manifestFile<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, callback<span class="tsd-signature-symbol">: </span><a href="_laya_utils_handler_.handler.html" class="tsd-signature-type">Handler</a>, type<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/layabox/LayaAir/blob/428b7e7e/src/layaAir/laya/net/ResourceVersion.ts#L27">laya/net/ResourceVersion.ts:27</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>启用资源版本管理。</p>
									<p>由于只有发布版本需要资源管理。因此没有资源管理文件时，可以设置manifestFile为null或者不存在的路径。</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>manifestFile: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>清单（json）文件的路径。</p>
									</div>
								</li>
								<li>
									<h5>callback: <a href="_laya_utils_handler_.handler.html" class="tsd-signature-type">Handler</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>清单（json）文件加载完成后执行。</p>
									</div>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagDefault value">Default value</span> type: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 2</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>FOLDER_VERSION为基于文件夹管理方式（老版本IDE默认类型），FILENAME_VERSION为基于文件名映射管理（新版本IDE默认类型</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
			</section>
		</div>
		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary">
				<ul>
					<li class="globals  ">
						<a href="../globals.html"><em>Globals</em></a>
					</li>
					<li class="current tsd-kind-module">
						<a href="../modules/_laya_net_resourceversion_.html">&quot;laya/net/<wbr>Resource<wbr>Version&quot;</a>
					</li>
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
				</ul>
				<ul class="current">
					<li class="current tsd-kind-class tsd-parent-kind-module">
						<a href="_laya_net_resourceversion_.resourceversion.html" class="tsd-kind-icon">Resource<wbr>Version</a>
						<ul>
							<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
								<a href="_laya_net_resourceversion_.resourceversion.html#filename_version" class="tsd-kind-icon">FILENAME_<wbr>VERSION</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
								<a href="_laya_net_resourceversion_.resourceversion.html#folder_version" class="tsd-kind-icon">FOLDER_<wbr>VERSION</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
								<a href="_laya_net_resourceversion_.resourceversion.html#manifest" class="tsd-kind-icon">manifest</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
								<a href="_laya_net_resourceversion_.resourceversion.html#type" class="tsd-kind-icon">type</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
								<a href="_laya_net_resourceversion_.resourceversion.html#addversionprefix" class="tsd-kind-icon">add<wbr>Version<wbr>Prefix</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
								<a href="_laya_net_resourceversion_.resourceversion.html#enable" class="tsd-kind-icon">enable</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul class="after-current">
				</ul>
			</nav>
		</div>
	</div>
</div>
<footer>
	<div class="container">
		<h2>Legend</h2>
		<div class="tsd-legend-group">
			<ul class="tsd-legend">
				<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
				<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
				<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
			</ul>
		</div>
	</div>
</footer>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>